//
//  L0EntryTableController.h
//  L0EntryTable
//
//  Created by ∞ on 18/07/08.
//  Copyright 2008 Emanuele Vulcano. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "L0EntrySection.h"
#import "L0EntryCell.h"

@class L0EntrySection;

@interface L0EntryTableController : UIViewController <UITableViewDataSource, UITableViewDelegate> {
	NSMutableArray* sections;
	IBOutlet UITableView* tableView;
	BOOL entryAllowed;
	BOOL onscreen;
	
	UIView* currentEditorView;
	
	L0EntryCell* aboutToBeSetUp;
}

@property(retain, nonatomic) UITableView* tableView;
@property BOOL entryAllowed;
@property(readonly) BOOL onscreen;

- (NSUInteger) countOfSections;
- (L0EntrySection*) objectInSectionsAtIndex:(NSUInteger) idx;
- (void) insertObject:(L0EntrySection*) s inSectionsAtIndex:(NSUInteger) idx;
- (void) removeObjectFromSectionsAtIndex:(NSUInteger) idx;
// also -mutableArrayValueForKey:@"sections".

- (NSUInteger) indexOfObjectInSections:(L0EntrySection*) s;

- (void) selectCellAtIndex:(NSUInteger) idx inSection:(L0EntrySection*) s;

- (void) deselect;

- (void) displayEditorView:(UIView*) editorView;
- (void) hideEditorView:(UIView*) editorView;

@end
